Nuclear magnetic resonance (NMR) and magnetic resonance imaging (MRI) are essential tools for both the physical and life sciences, but have been limited to the detection of large ensembles of spins due to their low sensitivity, or the macroscopic nature of sensors. It is desirable to push this sensitivity to its ultimate physical limit, the detection of individual nuclear spin signals localized in a small volume.